package org.dromara.datacheck.controller.jst;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.hutool.core.collection.CollUtil;
import jakarta.servlet.http.HttpServletResponse;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.RequiredArgsConstructor;
import org.dromara.common.core.domain.R;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import org.dromara.common.excel.core.ExcelResult;
import org.dromara.common.excel.utils.ExcelUtil;
import org.dromara.common.idempotent.annotation.RepeatSubmit;
import org.dromara.common.log.annotation.Log;
import org.dromara.common.log.enums.BusinessType;
import org.dromara.common.mybatis.core.page.PageQuery;
import org.dromara.common.mybatis.core.page.TableDataInfo;
import org.dromara.common.web.core.BaseController;
import org.dromara.datacheck.domain.bo.JstAndJDTableDataEntryBo;
import org.dromara.datacheck.domain.bo.jst.JstSaleOutWarehouseOrderBo;
import org.dromara.datacheck.domain.jst.JstSaleOutWarehouseOrder;
import org.dromara.datacheck.domain.jstandjddiff.JstAndJDDiffDataEntryBo;
import org.dromara.datacheck.domain.vo.jst.JstSaleOutWarehouseOrderImportVo;
import org.dromara.datacheck.domain.vo.jst.JstSaleOutWarehouseOrderVo;
import org.dromara.datacheck.listener.jst.JstSaleOutWarehouseOrderImportListener;
import org.dromara.datacheck.service.jst.IJstSaleOutWarehouseOrderService;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.text.ParseException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;

/**
 * 聚水潭-销售出库单
 *
 * @author 刘武贵
 * @date 2024-09-08
 */
@Validated
@RequiredArgsConstructor
@RestController
@RequestMapping("/dataCheck/jst/saleOutWarehouseOrder")
public class JstSaleOutWarehouseOrderController extends BaseController {

    private final IJstSaleOutWarehouseOrderService jstSaleOutWarehouseOrderService;

    /**
     * 查询聚水潭-销售出库单列表
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> list(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageList(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(JstSaleOutWarehouseOrderBo bo, HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryList(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 导出聚水潭-销售出库单列表（根据id导出的测试方法）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单", businessType = BusinessType.EXPORT)
    @PostMapping("/exportNew")
    public void exportNew(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListNew(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 获取聚水潭-销售出库单详细信息
     *
     * @param id 主键
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:query")
    @GetMapping("/{id}")
    public R<JstSaleOutWarehouseOrderVo> getInfo(@NotNull(message = "主键不能为空")
                                     @PathVariable Long id) {
        return R.ok(jstSaleOutWarehouseOrderService.queryById(id));
    }

    /**
     * 新增聚水潭-销售出库单
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:add")
    @Log(title = "聚水潭-销售出库单", businessType = BusinessType.INSERT)
    @RepeatSubmit()
    @PostMapping()
    public R<Void> add(@Validated(AddGroup.class) @RequestBody JstSaleOutWarehouseOrderBo bo) {
        return toAjax(jstSaleOutWarehouseOrderService.insertByBo(bo));
    }

    /**
     * 修改聚水潭-销售出库单
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:edit")
    @Log(title = "聚水潭-销售出库单", businessType = BusinessType.UPDATE)
    @RepeatSubmit()
    @PutMapping()
    public R<Void> edit(@Validated(EditGroup.class) @RequestBody JstSaleOutWarehouseOrderBo bo) {
        return toAjax(jstSaleOutWarehouseOrderService.updateByBo(bo));
    }

    /**
     * 删除聚水潭-销售出库单
     *
     * @param ids 主键串
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:remove")
    @Log(title = "聚水潭-销售出库单", businessType = BusinessType.DELETE)
    @DeleteMapping("/{ids}")
    public R<Void> remove(@NotEmpty(message = "主键不能为空")
                          @PathVariable Long[] ids) {
        return toAjax(jstSaleOutWarehouseOrderService.deleteWithValidByIds(List.of(ids), true));
    }

    /**
     * 导入数据
     *
     * @param file          导入文件
     * @param updateSupport 是否更新已存在数据
     */
    @Log(title = "聚水潭-销售出库单导入", businessType = BusinessType.IMPORT)
    @PostMapping(value = "/importData", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    public R<Void> importData(@RequestPart("file") MultipartFile file, boolean updateSupport) throws Exception {
        // 每次导入之前清空表里的数据
        List<JstSaleOutWarehouseOrder> jstSaleOutWarehouseOrderList = jstSaleOutWarehouseOrderService.queryAll();
        if(CollUtil.isNotEmpty(jstSaleOutWarehouseOrderList)){
            jstSaleOutWarehouseOrderService.deleteAll();
        }
        // 解析Excel文件并处理导入逻辑
        ExcelResult<JstSaleOutWarehouseOrderImportVo> result = ExcelUtil.importExcel(file.getInputStream(), JstSaleOutWarehouseOrderImportVo.class, new JstSaleOutWarehouseOrderImportListener(updateSupport));
        return R.ok(result.getAnalysis());
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：寄售-寄售调拨（猫超，进口猫超，京东自营）
     * 业务查询条件：根据shop_name店铺名称为国内货代仓店铺（分销指定）、京东-TYMO京东自营店、天猫-TYMO天猫超市、天猫-TYMO天猫进口超市、,国内零星分销查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name1")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName1(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("京东-TYMO京东自营店","天猫-TYMO天猫超市","天猫-TYMO天猫进口超市","国内零星分销"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName1(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：寄售-寄售换货-发货(猫超售后店铺，进口猫超售后店铺)
     * 业务查询条件：根据shop_name店铺名称为天猫超市-售后店铺、天猫进口超市-售后店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name2")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName2(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("天猫超市-售后店铺","天猫进口超市-售后店铺"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName2(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：分销（山姆）销售-销售
     * 业务查询条件：根据shop_name店铺名称为国内山姆查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name3")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName3(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("国内山姆"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName3(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：部门领料-网红达人店
     * 业务查询条件：根据shop_name店铺名称为网红达人店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name4")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName4(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("网红达人店铺"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName4(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：部门领料-展销店铺店发货
     * 业务查询条件：根据shop_name店铺名称为展销样品店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name5")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName5(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("展销样品店铺"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName5(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：部门领料-办公店铺
     * 业务查询条件：根据shop_name店铺名称为办公室店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name6")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName6(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("办公室店铺"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName6(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：部门领料-研发店铺
     * 业务查询条件：根据shop_name店铺名称为研发店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name7")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName7(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("研发店铺"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName7(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：海外出口-海外出口（东莞仓)
     * 业务查询条件：根据shop_name店铺名称为海外备货店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name8")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName8(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        bo.setShopNameList(Arrays.asList("海外备货店铺","国内货代仓店铺（分销指定）"));
        return jstSaleOutWarehouseOrderService.queryPageListByShopName8(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 场景分类：2C销售-销售发货
     * 业务查询条件：根据shop_name店铺名称为除了
     * 国内货代仓店铺（分销指定）、京东-TYMO京东自营店、天猫-TYMO天猫超市、天猫-TYMO天猫进口超市
     * 国内山姆、网红达人店铺、展销样品店铺、办公室店铺、研发店铺、海外备货店铺
     * 天猫超市-售后店铺、天猫进口超市-售后店铺
     * 的所有店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name9")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopName9(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopName9(bo, pageQuery);
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 按日期汇总的统计数据（测试接口1）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-test1")
    public TableDataInfo<Map<String, Object>> jstAndJdSumTest1() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumTest1();
    }

    /**
     * 查询聚水潭-销售出库单列表
     * 按日期汇总的统计数据（测试接口2）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-test2")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumTest2() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumTest2();
    }

    /**
     * 查询聚水潭-销售出库单列表的差异接口
     * 场景分类：2C销售-销售发货
     * 业务查询条件：根据shop_name店铺名称为除了
     * 国内货代仓店铺（分销指定）、京东-TYMO京东自营店、天猫-TYMO天猫超市、天猫-TYMO天猫进口超市、国内零星分销
     * 国内山姆、网红达人店铺、展销样品店铺、办公室店铺、研发店铺、海外备货店铺
     * 天猫超市-售后店铺、天猫进口超市-售后店铺
     * 的所有店铺查询
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-2c-diff")
    public TableDataInfo<JstAndJDDiffDataEntryBo> jstAndJd2cDiff() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJd2cDiff();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-直接调拨单（东莞仓->在途）数据汇总（按日期汇总）
     * 场景分类：2、2C销售-销售发货
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-sale-delivery")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateBySaleDelivery() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateBySaleDelivery();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-直接调拨单（东莞仓->寄售仓）数据汇总（按日期汇总）
     * 场景分类：3、寄售-寄售调拨（猫超，进口猫超，京东自营）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-consignment-allot")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByConsignmentAllot() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByConsignmentAllot();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-销售出库单数据汇总（按日期汇总）
     * 场景分类：3、寄售-寄售换货-发货(猫超售后店铺，进口猫超售后店铺)
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-consignment-exchange-goods")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByConsignmentAllotExchangeGoods() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByConsignmentAllotExchangeGoods();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-销售出库单数据汇总（按日期汇总）
     * 场景分类：4、分销（山姆）销售-销售
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-distribution-shan-mu")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByDistributionShanMu() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByDistributionShanMu();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-其他出库单数据汇总（按日期汇总）
     * 场景分类：5、部门领料-网红达人店
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-dept-get-material1")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByDeptGetMaterial1() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByDeptGetMaterial1();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-其他出库单数据汇总（按日期汇总）
     * 场景分类：5、部门领料-展销店铺店发货
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-dept-get-material2")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByDeptGetMaterial2() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByDeptGetMaterial2();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-其他出库单数据汇总（按日期汇总）
     * 场景分类：5、部门领料-办公店铺
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-dept-get-material3")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByDeptGetMaterial3() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByDeptGetMaterial3();
    }


    /**
     * 查询聚水潭-销售出库单列表以及金蝶-其他出库单数据汇总（按日期汇总）
     * 场景分类：5、部门领料-研发店铺
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-dept-get-material4")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByDeptGetMaterial4() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByDeptGetMaterial4();
    }

    /**
     * 查询聚水潭-销售出库单列表以及金蝶-直接调拨单(东莞仓->待报关在途仓）汇总（按日期汇总）
     * 场景分类：9、海外出口-海外出口（东莞仓)
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/jst-and-jd-sum-by-date-by-over-seas-export")
    public TableDataInfo<JstAndJDTableDataEntryBo> jstAndJdSumByDateByOverSeasExport() throws ParseException {
        return jstSaleOutWarehouseOrderService.jstAndJdSumByDateByOverSeasExport();
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：3、寄售-寄售调拨（猫超，进口猫超，京东自营）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency1")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency1(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency1(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出3、寄售-寄售调拨（猫超，进口猫超，京东自营）的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出3、寄售-寄售调拨（猫超，进口猫超，京东自营）的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference1")
    public void exportConsignmentBusinessDifference1(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference1(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：3、寄售-寄售换货-发货(猫超售后店铺，进口猫超售后店铺)
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency2")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency2(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency2(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出3、寄售-寄售换货-发货(猫超售后店铺，进口猫超售后店铺)的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出3、寄售-寄售换货-发货(猫超售后店铺，进口猫超售后店铺)的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference2")
    public void exportConsignmentBusinessDifference2(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference2(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：4、分销（山姆）销售-销售
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency3")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency3(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency3(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出4、分销（山姆）销售-销售的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出4、分销（山姆）销售-销售的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference3")
    public void exportConsignmentBusinessDifference3(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference3(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：5、部门领料-网红达人店
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency4")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency4(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency4(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出5、部门领料-网红达人店的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出5、部门领料-网红达人店的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference4")
    public void exportConsignmentBusinessDifference4(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference4(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：5、部门领料-展销店铺店发货
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency5")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency5(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency5(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出5、部门领料-展销店铺店发货的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出5、部门领料-展销店铺店发货的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference5")
    public void exportConsignmentBusinessDifference5(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference5(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：5、部门领料-办公店铺店发货
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency6")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency6(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency6(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出5、部门领料-办公店铺店发货的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出5、部门领料-办公店铺店发货的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference6")
    public void exportConsignmentBusinessDifference6(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference6(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：5、部门领料-研发店铺发货
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency7")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency7(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency7(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出5、部门领料-研发店铺的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出5、部门领料-研发店铺的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference7")
    public void exportConsignmentBusinessDifference7(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference7(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }

    /**
     * 查询聚水潭-销售出库单列表（金蝶缺少的数据）
     * 场景分类：9、海外出口-海外出口（东莞仓)
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:list")
    @GetMapping("/list-by-shop-name-by-jd-deficiency8")
    public TableDataInfo<JstSaleOutWarehouseOrderVo> listByShopNameByJdDeficiency8(JstSaleOutWarehouseOrderBo bo, PageQuery pageQuery) {
        return jstSaleOutWarehouseOrderService.queryPageListByShopNameByJdDeficiency8(bo, pageQuery);
    }

    /**
     * 导出聚水潭-销售出库单列表（导出9、海外出口-海外出口（东莞仓)的差异数据）
     */
    @SaCheckPermission("dataCheck:saleOutWarehouseOrder:export")
    @Log(title = "聚水潭-销售出库单（导出9、海外出口-海外出口（东莞仓)的差异数据）", businessType = BusinessType.EXPORT)
    @PostMapping("/export-consignment-business-difference8")
    public void exportConsignmentBusinessDifference8(JstSaleOutWarehouseOrderBo bo,HttpServletResponse response) {
        List<JstSaleOutWarehouseOrderVo> list = jstSaleOutWarehouseOrderService.queryListConsignmentBusinessDifference8(bo);
        ExcelUtil.exportExcel(list, "聚水潭-销售出库单", JstSaleOutWarehouseOrderVo.class, response);
    }


}
